<include file="Public:header"/>

<div class="table-tit">
    <a href="{:U('Cash/finrovl')}">结算申请详情</a>&nbsp;>>&nbsp;#{$info.set_sn}
    <span class="pull-right">
        <if condition="$info.set_status egt 200 and $info.set_status lt 300">
            <button type="button" class="btn btn-success btn-xs" data-toggle="modal" data-target="#checktrue">复审通过</button>
            <button type="button" class="btn btn-danger btn-xs" data-toggle="modal" data-target="#checkfalse">复审失败</button>
        </if>
        <if condition="$info.set_status egt 300 and $info.set_status lt 400">
            <button type="button" class="btn btn-danger btn-xs" data-toggle="modal" data-target="#Pay301">未付款-银行名字匹配失败</button>
            <button type="button" class="btn btn-danger btn-xs" data-toggle="modal" data-target="#Pay302">未付款-银行系统错误</button>
            <button type="button" class="btn btn-danger btn-xs" data-toggle="modal" data-target="#Pay303">未付款-支付系统错误</button>
            <button type="button" class="btn btn-success btn-xs" data-toggle="modal" data-target="#Pay400">已支付</button>
        </if>
    </span>
</div>
<table class='table table-bordered table-bgfont'>
    <tr>
        <th colspan='4'>基本信息</th>
        <th colspan="2" width="30%" rowspan='3' class="goldfont">
            <span>总计金额</span>
            <font color="#C0392B">￥{$info.set_cash}</font>
        </th>
    </tr>
    <tr>
        <td width='10%'><if condition="$info.set_ssaid neq 0">推广员<else/>代理人</if></td>
        <td width='25%'>
            <if condition="$info.set_ssaid neq 0">
                {$info.set_ssaid|getStaffName=$v['set_ssaid'],###}
                <else/>
                {$info.set_agent|getAgentName=$v['set_agent'],###}
            </if>
        </td>
        <td width='10%'>申请时间</td>
        <td width='25%'>{$info.set_time|date='Y-m-d H:i:s',###}</td>
    </tr>
    <tr>
        <td>结算周期</td>
        <td>{$info.set_month}</td>
        <td>支付时间</td>
        <td>{$info.set_paytime|date='Y-m-d H:i:s',###}</td>
    </tr>
</table>

<table class='table table-bordered table-bgfont'>
    <tr>
        <th colspan='4'>银行信息</th>
        <th colspan="2" width="30%" rowspan='3' class="goldfont">
            <span>状态</span>
            <switch name="info.set_status">
                <case value="100"><font class="text-primary">初审中</font></case>
                <case value="102"><font class="text-danger">初审失败</font></case>
                <case value="200"><font class="text-warning">复核中</font></case>
                <case value="202"><font class="text-danger">复核失败</font></case>
                <case value="300"><font class="text-warning">未付款</font></case>
                <case value="301"><font class="text-info">银行退回</font></case>
                <case value="302"><font class="text-info">网络错误</font></case>
                <case value="400"><font class="text-success">已付款</font></case>
            </switch>
        </th>
    </tr>
    <tr>
        <td width="10%">收款人</td>
        <td width="25%">{$info.set_asname}</td>
        <td width="10%">开户行</td>
        <td width="25%">{$info.set_bank}</td>
    </tr>
    <tr>
        <td width="10%">银行账号</td>
        <td colspan="3">{$info.set_bankcard}</td>
    </tr>
    <tr>
        <td width="10%">备注</td>
        <td colspan="5">{$info.set_log}</td>
    </tr>
</table>

<!--if condition="$info.set_ssaid neq 0">
<table class='table table-bordered table-bgfont'>
    <tr>
        <th colspan="6">销售代码</th>
    </tr>
    <tr>
        <td width="10%">代码</td>
        <td width="25%"><a href="{:U('Dash/salecodeover','cod='.$code['dis_id'])}" target="_blank">{$code.dis_isbn}</a></td>
        <td width="10%">开始日期</td>
        <td width="25%">{$code.dis_timecode}</td>
        <td width="10%">截止日期</td>
        <td>{$code.dis_endtimecode}</td>
    </tr>
</table>
</if>
<table class='table table-bordered table-bgfont'>
    <tr>
        <th colspan="2">账单信息</th>
    </tr>
    <tr>
        <td width="10%">销售记录</td>
        <td class="clearfix">
            <volist name="list" id="v">
                <dl class="dl-horizontal salecode-count">
                    <dt>{$v.c_ordsn}</dt>
                    <dd>金额:{$v.c_in}元</dd>
                </dl>
            </volist>
        </td>
    </tr>
</table-->

<!-- Modal -->
<div class="modal fade" id="checktrue" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">审核消息</h4>
            </div>
            <div class="modal-body">确定通过账务审核,进行下一步?</div>
            <div class="modal-footer">
                <form action="{:U('Cash/applyFi','sid='.$info['set_id'])}" method="post">
                    <input type="hidden" name="set_status" value="300"/>
                    <button type="submit" class="btn btn-danger">确认</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                </form>
            </div>
        </div>
    </div>
</div>
<!-- Modal2 -->
<div class="modal fade" id="checkfalse" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">审核消息</h4>
            </div>
            <form action="{:U('Cash/applyFi','sid='.$info['set_id'])}" method="post">
                <div class="modal-body">
                    确定账务错误，不予通过?<br/><br/>
                    <div class="form-group">
                        <label>说明:</label>
                        <textarea class="form-control" name='set_log' rows="3" required></textarea>
                        <input type="hidden" name="set_status" value="202"/>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="submit" class="btn btn-danger">确认</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                </div>
            </form>
        </div>
    </div>
</div>
<!-- notpay 301 -->
<div class="modal fade" id="Pay301" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">审核消息</h4>
            </div>
            <div class="modal-body">确定支付名字未匹配,进行下一步?</div>
            <div class="modal-footer">
                <form action="{:U('Cash/applyFi','sid='.$info['set_id'])}" method="post">
                    <input type="hidden" name="set_status" value="301"/>
                    <button type="submit" class="btn btn-danger">确认</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                </form>
            </div>
        </div>
    </div>
</div>
<!-- notpay 302 -->
<div class="modal fade" id="Pay302" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">审核消息</h4>
            </div>
            <div class="modal-body">确定银行错误,进行下一步?</div>
            <div class="modal-footer">
                <form action="{:U('Cash/applyFi','sid='.$info['set_id'])}" method="post">
                    <input type="hidden" name="set_status" value="302"/>
                    <button type="submit" class="btn btn-danger">确认</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                </form>
            </div>
        </div>
    </div>
</div>
<!-- notpay 303 -->
<div class="modal fade" id="Pay303" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">审核消息</h4>
            </div>
            <div class="modal-body">确定系统错误,进行下一步?</div>
            <div class="modal-footer">
                <form action="{:U('Cash/applyFi','sid='.$info['set_id'])}" method="post">
                    <input type="hidden" name="set_status" value="303"/>
                    <button type="submit" class="btn btn-danger">确认</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                </form>
            </div>
        </div>
    </div>
</div>
<!--  400 -->
<div class="modal fade" id="Pay400" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">审核消息</h4>
            </div>
            <div class="modal-body">确定已经支付?</div>
            <div class="modal-footer">
                <form action="{:U('Cash/applyFi','sid='.$info['set_id'])}" method="post">
                    <input type="hidden" name="set_status" value="400"/>
                    <button type="submit" class="btn btn-danger">确认</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                </form>
            </div>
        </div>
    </div>
</div>
<include file="Public:footer"/>